package com.sckj.springboot.exception;

/**
 * 业务拦截
 * */
public class BusinessErrorException extends  RuntimeException{
    private String code;
    private String massage;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMassage() {
        return massage;
    }

    public void setMassage(String massage) {
        this.massage = massage;
    }

    public BusinessErrorException(BusinessMsgEnum businessMsgEnum){
        this.code = businessMsgEnum.code();
        this.massage = businessMsgEnum.msg();
    }
}
